import ins from '../axios';

export function list(params) {
  return ins.get('/products/all', { params });
}

export function remove(id) {
  return ins.delete(`/products/${id}`);
  // return Promise.resolve(1);
}

export function add(params) {
  return ins.post('/products/add', params);
}

export function detail(id) {
  return ins.get(`/products/${id}`);
}

export function edit(params) {
  return ins.put('/products/edit', params);
}
